﻿
Partial Class Control_PersonalBar
    Inherits System.Web.UI.UserControl

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Not Page.IsPostBack Then
            If Session("UserName") Is Nothing Then
                Dim retURL = Request.RawUrl
                Response.Redirect("~/Login.aspx?retURL=" & retURL)
            End If
        End If
    End Sub

    Protected Sub lbtnExit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles lbtnExit.Click
        Session("UserName") = Nothing
        Session("RoleID") = Nothing
        Response.Redirect("~/Login.aspx")
    End Sub
    Protected Sub hplChangePassword_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles hplChangePassword.Init
        hplChangePassword.CssClass = "thickbox"
        hplChangePassword.NavigateUrl = "~/Page/ChangePassword.aspx?keepThis=true&TB_iframe=true&height=215&width=210&modal=true"
    End Sub

    Protected Sub lbtnUserProfile_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles lbtnUserProfile.Click
        Response.Redirect("~/Page/Users/UserProfile.aspx?Username=" & Session("Username"))
    End Sub
End Class
